[mirrors]
ftp://mirrors.kernel.org/sources.redhat.com/libffi/libffi-3.0.13.tar.gz
http://mirrors.kernel.org/sources.redhat.com/libffi/libffi-3.0.13.tar.gz

[vars]
filesize=845747
sha512=fc47f5d25197c631754efe05a349edb556d072807ecef19b41f17c1a8f39c95221be64926fbd05b1f8439181df1ddff8fc01462ce3a26005b75159ddc27e6f6a
desc='foreign function interface lib. used by script langs to interface with C.'

[deps]

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) --with-libtool-sysroot=$butch_root_dir"
CFLAGS=-D_GNU_SOURCE ./configure -C \
  --prefix="$butch_prefix" $xconfflags
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
dest="$butch_install_dir""$butch_prefix"
if [ "$A" = x86_64 ] ; then
	mv "$dest"/lib64/* "$dest"/lib/ || true
	sed -i 's,/lib/../lib64,/lib,' "$dest"/lib/libffi.la
fi
